package hr.service.impl;

import hr.mapper.HrMapper;
import hr.mapper.dto.HrDto;
import hr.pojo.UserCompensation;
import hr.service.HrService;
import hr.service.vo.Pager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lenovo on 2018/1/29.
 */
@Service("hrService")
@Transactional
public class HrServiceImpl implements HrService{

    @Resource
    private HrMapper hrMapper;

    @Override
    @Transactional(readOnly = true)
    public Pager findUCommAll(Integer offset, Integer limit, HrDto dto) {
            Pager pager = new Pager();
            pager.setRows(hrMapper.findUCommAll(offset,limit,dto));
            pager.setTotal(hrMapper.findTotal(dto));
            return pager;
    }
}
